package com.wmm.jhdriver;

import android.app.Application;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import com.tencent.bugly.crashreport.CrashReport;

public class MyApp extends Application {
    private static SQLiteDbHelper helper;
    private static Context context;
    private static SQLiteDatabase database;
    @Override
    public void onCreate() {
        super.onCreate();
        context=this;
        helper=new SQLiteDbHelper(context);
        CrashReport.initCrashReport(getApplicationContext(), "7ce9eeb7ba", true);
    }
    public static SQLiteDatabase getInstance(){
        if(database==null){
            database= helper.getWritableDatabase();
        }
        return  database;
    }
}
